let vm = new Vue({
    el:'#main',
    data:{
        pwds:{
            oldPwd:'',
            newPwd:'',
            multiPwd:''
        }
    },
    methods:{
        modifyPwd:function () {
            axios({
                url: `admin/modifyPwd`,
                data: this.pwds,
                method: "post"
            }).then(response =>{
                if(response.data.success){
                    layer.msg("更新成功",{
                        time:2000
                    },function () {
                        location.reload();
                    });
                }else{
                    layer.msg(response.data.msg)
                }
            }).catch(error=>{
                layer.msg(error.message);
            })
        },
        flash:function () {
            location.reload();
        }

    }
});